<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
test(function(){
  assert_selection(
    [
      '<div contenteditable><table id="base"><tbody>',
        '<tr><td contenteditable="false" id="extent">foo</td></tr>',
      '</tbody></table></div>'
    ].join(''),
    selection => {
      const base = selection.document.getElementById('base');
      const extent = selection.document.getElementById('extent');
      selection.setBaseAndExtent(base, 0, extent, 0);
    },
    [
      '<div contenteditable><table id="base">^<tbody>',
        '<tr><td contenteditable="false" id="extent">|foo</td></tr>',
      '</tbody></table></div>'
    ].join('')
    );
}, 
'with one endpoint in non-editable content and the other in editable content');
</script>
